package tk.jfree.example.es.api.pagehelper;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author Cheng.Wei
 * @date 2019/04/29 00:21
 */
@Getter
@Setter
@ToString
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class Page<T> implements Serializable {
    private static final long serialVersionUID = 3871737102346431851L;
    /**页码，从1开始*/
    private int pageNum;
    /**页面大小*/
    private int pageSize;
    /**总数*/
    private long total;
    /**总页数*/
    private int pages;
    /**数据*/
    private T list;
    /**
     * 聚合后的数据 主要包含品牌和属性
     */
    private Map<String, List<String>> aggRes = new HashMap<>();
}
